home *** CD-ROM | disk | FTP | other *** search
/ Games of Daze / Infomagic - Games of Daze (Summer 1995) (Disc 1 of 2).iso / djgpp / contrib / pdcurs22 / src / private / pdcgo32.c < prev    next >
Encoding:
C/C++ Source or Header  |  1995-01-26  |  1.6 KB  |  60 lines

  1. /*
  2. ***************************************************************************
  3. * This file comprises part of PDCurses. PDCurses is Public Domain software.
  4. * You may use this code for whatever purposes you desire. This software
  5. * is provided AS IS with NO WARRANTY whatsoever.
  6. * Should this software be used in another application, an acknowledgement
  7. * that PDCurses code is used would be appreciated, but is not mandatory.
  8. *
  9. * Any changes which you make to this software which may improve or enhance
  10. * it, should be forwarded to the current maintainer for the benefit of 
  11. * other users.
  12. *
  13. * The only restriction placed on this code is that no distribution of
  14. * modified PDCurses code be made under the PDCurses name, by anyone
  15. * other than the current maintainer.
  16. * See the file maintain.er for details of the current maintainer.
  17. ***************************************************************************
  18. */
  19. #define CURSES_LIBRARY  1
  20. #include <curses.h>
  21.  
  22. #ifdef PDCDEBUG
  23. char *rcsid_PDCgo32  = "$Id$";
  24. #endif
  25.  
  26.  
  27. #ifdef GO32
  28.  
  29. #include <pc.h>    /* prototypes of dosmemget() and dosmemput() */
  30.  
  31. unsigned char getdosmembyte (int offset)
  32. {
  33.  unsigned char b=0;
  34.  
  35.   dosmemget (offset, sizeof(unsigned char), &b);
  36.   return b;
  37. }
  38.  
  39. unsigned short getdosmemword (int offset)
  40. {
  41.   unsigned short w=0;
  42.  
  43.   dosmemget (offset, sizeof(unsigned short), &w);
  44.   return w;
  45. }
  46.  
  47. void setdosmembyte (int offset, unsigned char b)
  48. {
  49.   dosmemput (&b, sizeof(unsigned char), offset);
  50. }
  51.  
  52. void setdosmemword (int offset, unsigned short w)
  53. {
  54.   dosmemput (&w, sizeof(unsigned short), offset);
  55. }
  56.  
  57. #endif
  58.  
  59.